const { Op } = require("sequelize");

const artClassModel = appRequire('models/artClass');

// 导出对象，供其它模块调用
module.exports = {
    list,
};

async function list(req, request) {
    let postData = req.body
    let returnData = Common.clone(Constant.DEFAULT_SUCCESS);

    let checkResult = Common.checkUrl(postData, [], request);
    if (checkResult == false) return;

    let params = {
        isSee: true
    }
    let artClass = await artClassModel.artClass.findAll({
        where: params,
        order: [['createdAt', 'ASC']],
    })
    artClass = Common.clone(artClass)

    returnData.data = artClass
    request.json(returnData)
}